package api

import (
	"github.com/gogf/gf/net/ghttp"
	"shrimp-blog-server/app/model"
)

func (*apiPageTemplate) Get(request *ghttp.Request) {
	pageTemplateService.GetPageTemplateById(request, getQueryParamID(request)...)
}

func (*apiPageTemplate) Post(request *ghttp.Request) {
	var pageTemplates []model.PageTemplate
	_ = request.Parse(&pageTemplates)
	pageTemplateService.AddPageTemplate(request, pageTemplates...)

}

func (*apiPageTemplate) Put(request *ghttp.Request) {
	var pageTemplates []model.PageTemplate
	_ = request.Parse(&pageTemplates)
	pageTemplateService.UpdatePageTemplate(request, pageTemplates...)
}

func (*apiPageTemplate) Delete(request *ghttp.Request) {
	pageTemplateService.DeletePageTemplate(request, getQueryParamID(request)...)
}
